<template>
  <component :is="view" @change="changeView" />
</template>

<script>
import Login from "./login";
import KpiLogin from "./kpiLogin";

export default {
  data: function() {
    return {
      view: `${window.ENV.loginSign}` == "login" ? Login : KpiLogin
    };
  },
  created() {
    this.view = `${window.ENV.loginSign}` == "login" ? Login : KpiLogin;
  },
  computed: {
    // isAdmin() {
    //   return this.$route.query.isAdmin;
    // }
  },
  methods: {
    changeView() {
      if (this.view == Login) {
        this.view = KpiLogin;
      } else {
        this.view = Login;
      }
    }
  }
};
</script>

<style  rel="stylesheet/scss" lang="scss" scoped>
</style>

